[

	var(
		($rewAction + '_SessionExpires') = 15,
		($rewAction + '_SessionName') = '_' + $rewAction,
		($rewAction + '_Required') = (Array),
		($rewAction + '_Validation') = (Array),
		($rewAction + '_ValidationWarnings') = (Array),
		($rewAction + '_Optional') = (Array),
		);
	var(
		'rewAction_ErrorPage_pathTo'      = (Var: ($rewAction + '_pathTo')) + 'Error/',
		'rewAction_ReviewPage_pathTo'     = (Var: ($rewAction + '_pathTo')) + 'View/',
		'rewAction_EditPage_pathTo'       = (Var: ($rewAction + '_pathTo')) + 'Edit/',
		'rewAction_DetailPage_pathTo'     = (Var: ($rewAction + '_pathTo')) + 'Detail/',
		'rewAction_ProcessPage_pathTo'    = (Var: ($rewAction + '_pathTo')) + 'Processing/',
		'rewAction_ResetPage_pathTo'      = (Var: ($rewAction + '_pathTo')) + 'Reset/',
		'rewAction_SuccessPage_pathTo'    = (Var: ($rewAction + '_pathTo')) + 'Success/',
		
		'REW_Base'       = (Var: ($rewAction + '_pathTo')),
		'REW_Create'        = (Var: ($rewAction + '_pathTo')) 'Create/',
		'REW_Detail'     = (Var: ($rewAction + '_pathTo')) 'Detail/',
		'REW_Delete'     = (Var: ($rewAction + '_pathTo')) 'Delete/',
		'REW_Edit'       = (Var: ($rewAction + '_pathTo')) 'Edit/',
		'REW_Add'        = (Var: ($rewAction + '_pathTo')) 'Add/',
		'REW_Review'     = (Var: ($rewAction + '_pathTo')) 'View/',
		'REW_Reset'      = (Var: ($rewAction + '_pathTo')) 'Reset/',
		
		'REW_Action'      = (Var: ($rewAction + '_pathTo')) '',
		
		'maxresults'=6,
		'maxpages'=6,
		);
	if: $rewAction_EditPage_pathTo->EndsWith('Edit/Edit/');
			// this is to over-ride the "edit" path, when we are INSIDE the edit section already
			/*
				note that lasso, as of 7.1.1 is removing THE ENTIRE 'Edit/Edit/' string -- not just the last one,
				so we are removing /Edit/ and then tacking / back onto it.
				
				it's a hack, but it works.  :\
			*/
			$rewAction_EditPage_pathTo->RemoveTrailing('/Edit/');
			$rewAction_EditPage_pathTo += '/';
	/if;
	if: $REW_Delete->EndsWith('Edit/Delete/');
			// this is to over-ride the "edit" path, when we are INSIDE the edit section already
			/*
				note that lasso, as of 7.1.1 is removing THE ENTIRE 'Edit/Edit/' string -- not just the last one,
				so we are removing /Edit/ and then tacking / back onto it.
				
				it's a hack, but it works.  :\
			*/
			$REW_Delete->RemoveTrailing('/Edit/Delete/');
			$REW_Delete += '/Delete/';
	/if;
	if: $rewAction_EditPage_pathTo->EndsWith('New/Edit/');
			// this is to over-ride the "edit" path, when we are INSIDE the new section 
			$rewAction_EditPage_pathTo->RemoveTrailing('New/Edit/');
			$rewAction_EditPage_pathTo += 'Edit/';
	/if;
	if: $rewAction_DetailPage_pathTo->EndsWith('Edit/Detail/');
			// this is to over-ride the "edit" path, when we are INSIDE the new section 
			$rewAction_DetailPage_pathTo->RemoveTrailing('Edit/Detail/');
			var('tempish'=$rewAction_DetailPage_pathTo);
			$rewAction_DetailPage_pathTo += 'Select/?and=' $and '&exit=' $tempish 'Detail/';
	/if;
	if: $rewAction_DetailPage_pathTo->EndsWith('New/Detail/');
			// this is to over-ride the "edit" path, when we are INSIDE the new section 
			$rewAction_DetailPage_pathTo->RemoveTrailing('New/Detail/');
			var('tempish'=$rewAction_DetailPage_pathTo);
			$rewAction_DetailPage_pathTo += 'Select/?and=' $and '&exit=' $tempish 'Detail/';
	/if;
	Session_Start:
		-Name=(Var: ($rewAction + '_SessionName')),
		-Expires=(Var: ($rewAction + '_SessionExpires')),
		-UseCookie,
		-Path=(Var: ($rewAction + '_pathTo'))
		;
	// this second session_start is to overcome an apparent bug in webstar
	Session_Start:
		-Name=(Var: ($rewAction + '_SessionName')),
		-Expires=(Var: ($rewAction + '_SessionExpires')),
		-UseCookie,
		-Path=(Var: ($rewAction + '_pathTo'))
		;
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Okay');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Missing');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Required');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Optional');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Empty');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_CustomError');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Invalid');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Error');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Table');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_SortOn');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Validation');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_ValidationWarnings');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_UIDfieldName');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_Checkboxes');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_savedSearchParams');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_savedStatement');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_savedStatementModifiers');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_savedSortField');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ($rewAction + '_savedSortOrder');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ('form_fields');
	
	
	Define: -Name=($rewAction + '_Okay'), -Default=(Map);
	Define: -Name=($rewAction + '_Missing'), -Default=(Map);
	Define: -Name=($rewAction + '_Required'), -Default=(Array);
	Define: -Name=($rewAction + '_Optional'), -Default=(Array);
	Define: -Name=($rewAction + '_Empty'), -Default=(Map);
	Define: -Name=($rewAction + '_Invalid'), -Default=(Map);
	Define: -Name=($rewAction + '_Error'), -Default=(String);
	Define: -Name=($rewAction + '_CustomError'), -Default=(String);

	Define: -Name=($rewAction + '_Table'), -Default=('users');
	Define: -Name=($rewAction + '_UIDfieldName'), -Default=('UID');
	Define: -Name=($rewAction + '_SortOn'), -Default=(Array);
	Define: -Name=($rewAction + '_Checkboxes'), -Default=(Array);
	Define: -Name=($rewAction + '_Validation'), -Default=(Array);
	Define: -Name=($rewAction + '_ValidationWarnings'), -Default=(Array);

	Define: -Name=($rewAction + '_savedSearchParams'), -Default=(Array);
	Define: -Name=($rewAction + '_savedStatement'), -Default=(String);
	Define: -Name=($rewAction + '_savedStatementModifiers'), -Default=(String);
	Define: -Name=($rewAction + '_savedSortField'), -Default=('UID');
	Define: -Name=($rewAction + '_savedSortOrder'), -Default=('ASC');
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), ((var($rewAction + '_UIDfieldName')));


	Define: -Name=('form_fields'), -Default=(array);
	
	Session_AddVariable: -Name=(Var: ($rewAction + '_SessionName')), 'keyword';
	Define: -Name='keyword', -Default=('');
	
		
		
]
